﻿{include file=member.header.html}
<script type="text/javascript">
$(function(){
  $('#yuyueTime').datepicker({dateFormat: 'yy-mm-dd',minDate: +0, maxDate: "+30D" });
});
</script>
<style>
.kdorder_add { background:#dddddd;}
.kdorder_add td{ background:#FFF; padding:8px;}
.kdorder_add .title_h1 { font-size:15px; color:#333; background:#d8ecfc; font-family:'Microsoft Yahei'}
.botton_submit {border:0;background:#ed5736;height:35px;width:120px;text-align:center;line-height:35px;font-family:"Microsoft YaHei";font-size:15px;color:#fff;cursor:pointer;border-radius:4px; margin-right:10px}
</style>
<div class="content_color">
<div class="content">
{include file=member.menu.html}
<div id="right">
{include file=member.submenu.html}
<div class="wrap">
<form action="" method="post" id="form_box">
<table cellspacing="1" width="100%" class="kdorder_add">
  <tr><td style="padding:12px 8px;background:#ffffe5;line-height:18px; font-size:13px">提示：一个包裹实际重量和体积重量都不能超过30磅。体积重量=长×宽×高（英寸）/166。一个包裹需要一张Fedex Label。若一个包裹，无论是实际重量还是体积重量，超过30磅就要加收US $15，超过60磅要加收US $40。小于或等于30磅：$15 一张Fedex Label。大于30磅，小于或等于60磅：$30 一张Fedex Label。大于60磅：$55 一张Fedex Label。</td></tr>
  <tr>
      <td class="title_h1">注：*号为必填写项</td>
  </tr>
  <tr>
    <td>
  <table width="100%" class="table_fill">
    <tr>
      <th><em>*</em>转运类别：</th>
      <td>
      <select name="cangku" id="cangku" class="select_class">
      <option value="0">=请选择=</option>
      <!--{foreach from=$category item=list key=key}-->
      <option value="{$list.cate_name}" {if $choose_xiangmu.0 eq $list.cate_name}selected="selected"{/if}>{$list.cate_name}</option>
      <!--{/foreach}-->
      </select>        
      </td>
    </tr>
    <tr>
      <th><em>*</em>预约时间：</th>
      <td><input type="input" class="text width_normal" name="yuyueTime" id="yuyueTime" placeholder="预约取件的时间，格式：2016-04-18" maxlength="20"/> <a href="{url app=article&act=abouts&code=booking}" target="_blank" class="links">请点击了解服务详情</a></td>
    </tr>    
    <tr>
      <th><em>*</em>取货件数：</th>
      <td>
      <select name="qujianNumber" id="qujianNumber" class="select_class">
      <option selected="selected" value="0">=请选择=</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      <option value="更多">更多</option>
      </select>
      </td>
    </tr>
    <tr>
      <th><em>*</em>联系人：</th>
      <td><input type="input" class="text width_normal" name="lianxiren" id="lianxiren" value="{$member.real_name}" maxlength="20" placeholder="请填写联系人姓名"/></td>
    </tr>
    <tr>
      <th><em>*</em>联系人电话：</th>
      <td><input type="input" class="text width_normal" name="mobilphone" id="mobilphone" value="{$member.phone_mob}" maxlength="20" placeholder="请填写联系人电话"/></td>
    </tr>
    <tr>
      <th><em>*</em>联系人邮箱：</th>
      <td><input type="input" class="text width_normal" name="Email" id="Email"  value="{$member.email}" maxlength="30" placeholder="请填写邮箱地址"/></td>
    </tr>
    <tr>
      <th></th>
      <td style="color:#999">注意：此处联系人、联系人电话、联系人邮箱为读取会员信息，您可以<a href="index.php?app=member&amp;act=profile" target="_blank" class="links">点击进入修改</a>。</td>
    </tr>    
    <tr>
      <th><em>*</em>国家/地区：</th>
      <td style="font-size:14px"><input name="txt_country" type="text" class="text" id="txt_country" style="width:90px;" value="{$order_info.txt_country}" maxlength="30" placeholder="国家/地区"/>&nbsp;
            省/州：<input name="txt_province" type="text" class="text" id="txt_province" style="width:90px;" value="{$order_info.txt_province}" maxlength="30" placeholder="省/州"/>&nbsp;
            城市：<input name="txt_city" type="text" class="text" id="txt_city" style="width:90px;" value="{$order_info.txt_city}" maxlength="30" placeholder="城市"/>&nbsp;
      </td>
    </tr>
    <tr>
      <th><em>*</em>详细地址：</th>
      <td><input name="address" type="text" class="text width_normal" id="address" maxlength="250" placeholder="请填写详细地址"/></td>
    </tr>      
    <tr>
      <th>邮编：</th>
      <td><input name="postoffice" type="text" class="text width_normal" id="postoffice" maxlength="20" onkeyup="clearNoNum(this)" />
      </td>
    </tr>         
    <tr>
      <th>备注：</th>
      <td><textarea name="notes" id="notes" class="text" style="width:350px;height:50px;" placeholder="可以填写预约取件的备注说明">{$order_info.Memo}</textarea></td>
    </tr>
    <tr>
      <th>&nbsp;</th>
      <td>
      <input type="button" name="imgButton" class="botton_submit" value="确认提交" onclick="return Check_form();" />
      <input type="reset" class="botton_submit" value="清空重写" style="background:#999"/>
      <!--{if $yubao_info.yubao_id}-->
      <input type="hidden" name="yubao_id"  value="{$order_info.yubao_id}"/><input type="hidden" name="act"  value="edit"/>
      <!--{else}-->
      <input type="hidden" name="act"  value="add"/>
      <!--{/if}-->
   </td>
    </tr>
  </table>
  </td>
  </tr>
</table>
</form>
</div></div>
<div class="clear"></div>
</div>
</div>
<script type="text/javascript">
//sumbit form
function Check_form() {
  if ($("#cangku").val() == "0") { alert("请选择转运类别");$("#cangku").focus(); return false; }
  if ($("#yuyueTime").val() == "") { alert("请选择预约时间");$("#yuyueTime").focus(); return false; }
  if ($("#qujianNumber").val() == "0") { alert("请选择取货件数");$("#qujianNumber").focus(); return false; }
  if ($("#lianxiren").val() == "") { alert("请输入联系人");$("#lianxiren").focus(); return false; }
  if ($("#mobilphone").val() == "") { 
      alert("请输入联系人电话");$("#mobilphone").focus(); return false; 
  }else{
	  var newstr = $("#mobilphone").val().replace(/\-/g, "");
	  if(/^[0-9\\-]*$/.test($("#mobilphone").val()) == false){ alert("手机/电话只能输入数字或者-横线，请正确输入");$("#mobilphone").focus(); return false; }
	  if(newstr.length < 10 || newstr.length > 13){ alert("您输入的寄件人手机/电话的格式有误，请输入10-13位的手机电话号码");$("#mobilphone").focus(); return false; }
  }
  if ($("#Email").val() == "") { 
      alert("请输入联系人邮箱");$("#Email").focus(); return false; 
  }else{
	  if( (/^(?:\w+\.?)*\w+@(?:\w+\.)*\w+$/.test($("#Email").val())) == false ){
		  alert("您输入的收件人邮箱地址格式有误，请正确输入");$("#Email").focus(); return false; 
	  } 	  
  }
  if ($("#txt_country").val() == "") {alert("请输入所在国家/地区");$("#txt_country").focus(); return false;}
  if ($("#txt_province").val() == "") {alert("请输入所在省/州");$("#txt_province").focus(); return false;}
  if ($("#txt_city").val() == "") {alert("请输入所在城市");$("#txt_city").focus(); return false;}
  if ($("#address").val() == "") {alert("请输入详细地址");$("#address").focus(); return false;}
  
  $("#form_box").submit();
}
</script>
{include file=footer_member.html}